package com.hly.dao;

import com.hly.model.Orders;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.SelectKey;

/**
 * @program: hly_emall_ssm
 * Author HLY
 * @desc
 * @create: 2020-10-12 10:52
 **/
public interface IOrdersDao {

    @Insert("insert orders (total,amount,status,paytype,user_id,systime) values (#{total},#{amount},#{status},#{paytype},#{userId},now())")
    @SelectKey(keyProperty = "id" , statement = "SELECT LAST_INSERT_ID()", before = false, resultType = Integer.class)
    public Integer insertOrder(Orders orders);
}
